import subprocess

# https://surrit.com/0844875b-7404-4c71-b3a1-0e859dccc752/playlist.m3u8
# https://surrit.com/eb3a9380-c8e8-467b-9da3-32c80474cf95/playlist.m3u8
# https://surrit.com/eb3a9380-c8e8-467b-9da3-32c80474cf95/1280x720/video.m3u8
video_url = "https://missav.com/dm13/ja/bkd-302"
output_path = "video.mp4"

# 构建youtube-dl的命令
cmd = ["youtube-dl", "-f", "bestvideo[ext=mp4]+bestaudio[ext=m4a]/mp4", "--output", output_path, video_url]

# 调用命令
subprocess.run(cmd)